Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datasource+ table fetching API #10659

Merged
merged 15 commits into from
May 23, 2023
Merged

Datasource+ table fetching API #10659

merged 15 commits into from
May 23, 2023

Conversation

mike12345567
Copy link
Collaborator

Description

This introduces a new API endpoint for datasource+ types, which allows retrieving the list of tables which are available within the datasource.

This does not attempt to retrieve any information about the schema of each of the tables, as this is strictly for determining which tables are of interest - we should not retrieve any information beyond what is required to confirm with the user the tables they need.

I've also introduced a new feature flag which can be used for determining whether or not the datasource supports the table fetching feature - this can be assumed for all datasource+ databases, but this could change in future (some DS+ might not be able to do this).

I've also added some more test cases for this, using the new API endpoint GET /api/datasources/:datasourceId/tables as well as some basic test cases for the connection verification API /api/datasources/verify - these will run as part of CI against Postgres.

@mike12345567 mike12345567 self-assigned this May 22, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2023

Codecov Report

Merging #10659 (676607d) into develop (a0bcc5d) will increase coverage by 0.08%.
The diff coverage is 40.90%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           develop   #10659      +/-   ##
===========================================
+ Coverage    69.48%   69.57%   +0.08%     
===========================================
  Files          536      536              
  Lines        19737    19775      +38     
  Branches      3914     3917       +3     
===========================================
+ Hits         13714    13758      +44     
+ Misses        5583     5581       -2     
+ Partials       440      436       -4     
Impacted Files Coverage Δ
packages/server/src/api/routes/datasource.ts 100.00% <ø> (ø)
...ages/server/src/integrations/microsoftSqlServer.ts 32.08% <0.00%> (-2.59%) ⬇️
packages/server/src/integrations/mysql.ts 46.61% <0.00%> (-2.59%) ⬇️
packages/server/src/integrations/oracle.ts 30.45% <0.00%> (-0.54%) ⬇️
packages/server/src/api/controllers/datasource.ts 59.11% <88.88%> (+8.59%) ⬆️
packages/server/src/integrations/googlesheets.ts 28.57% <100.00%> (+3.23%) ⬆️
packages/server/src/integrations/postgres.ts 61.80% <100.00%> (+7.45%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Budibase Budibase deleted a comment from adrinr May 23, 2023
@adrinr adrinr merged commit ff3e490 into develop May 23, 2023
@adrinr adrinr deleted the feature/table-fetching branch May 23, 2023 13:39
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2023
@mike12345567 mike12345567 restored the feature/table-fetching branch June 7, 2023 18:09
@mike12345567 mike12345567 deleted the feature/table-fetching branch June 7, 2023 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants